home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / BlitzC2P / DemoB040.ascii < prev    next >
Encoding:
Text File  |  1998-08-01  |  11.3 KB  |  615 lines

  1. WBStartup
  2. NoCli
  3.  
  4. #c2pBPLX=320 ; chunky operation width
  5. #c2pBPLY=240 ; chunky operation height
  6. #planeheight=240 ; planar display height, must not be smaller than c2pBPLY
  7. #c2pBPLSIZE=(#c2pBPLX*#planeheight)/8
  8.  
  9. #scrwidth=#c2pBPLX
  10. #scrheight=#c2pBPLY
  11.  
  12. #iterations=40 ; iterations to test the addition of each set of objects (not total)
  13.  
  14. objcount.l=10 ; number of objects (must be greater than 0) to start with
  15. #maxobjcount=3000 ; maximum number of objects to do (must be greater than objcount!)
  16. #targetfps=25 ; number of frames per second you want to run at
  17. #objmasking=1 ; Nonzero=masking
  18. #objadd=10 ; number of objects to add each time
  19.  
  20. #objwidth=16 ; minimum of 8
  21. #objheight=16 ; minimum of 1
  22. #objlongwidth=#objwidth/4
  23.  
  24. ; c2p1x1_8_c5_040
  25.  
  26. ; 110% on 040-25
  27.  
  28. Statement c2p040onlyinit{A.l,B.l}
  29. .c2p040onlyinit
  30.   ;A.l=d0=Width.w
  31.   ;B.l=d1=Height.w
  32.  
  33. ; d0.w  chunkyx [chunky-pixels]
  34. ; d1.w  chunkyy [chunky-pixels]
  35. ; d3.w  scroffsy [screen-pixels]
  36.  
  37. c2p1x1_8_c5_040_init
  38.   LEA c2p_datanew(pc),a0
  39.   ANDI.l  #$ffff,d0
  40.   MULU.w  d0,d3
  41.   LSR.l #3,d3
  42.   MOVE.l  d3,c2p_scroffs-c2p_data(a0)
  43.   MULU.w  d0,d1
  44.   MOVE.l  d1,c2p_pixels-c2p_data(a0)
  45. AsmExit
  46. End Statement
  47.  
  48. Statement c2p040only{A.l,B.l}
  49. .c2p040only
  50.   MOVE.l  d0,a0 ; Chunky
  51.   MOVE.l  d1,a1 ; Planar
  52. ; a0  c2pscreen
  53. ; a1  bitplanes
  54.  
  55. c2p1x1_8_c5_040
  56.   MOVEM.l a3-a6,-(a7)
  57.  
  58.   MOVEM.l a0-a1,-(a7)
  59.   LEA c2p_datanew,a0
  60.   LEA c2p_data,a1
  61.   MOVEQ #16-1,d0
  62. _c2pcopy: MOVE.l  (a0)+,(a1)+
  63.   DBF d0,_c2pcopy
  64.   MOVEM.l (a7)+,a0-a1
  65.   MOVE.l  a7,stackstore
  66.   MOVE.l  #0,a7
  67.   LEA c2p_data(pc),a2
  68.  
  69.   MOVE.l  c2p_pixels-c2p_data(a2),a3
  70.   ADD.l a0,a3
  71.  
  72.   ADD.w #c2pBPLSIZE,a1
  73.   ADD.l c2p_scroffs-c2p_data(a2),a1
  74.   MOVE.l  a1,a2
  75.   ADD.l #c2pBPLSIZE*4,a2
  76.  
  77.   MOVE.l  (a0),d0
  78.   MOVE.l  a7,(a0)+
  79.   MOVE.l  (a0),d1
  80.   MOVE.l  a7,(a0)+
  81.   MOVE.l  (a0),d2
  82.   MOVE.l  a7,(a0)+
  83.   MOVE.l  (a0),d3
  84.   MOVE.l  a7,(a0)+
  85.   MOVE.l  (a0),d4
  86.   MOVE.l  a7,(a0)+
  87.   MOVE.l  (a0),d5
  88.   MOVE.l  a7,(a0)+
  89.  
  90.   MOVE.l  d4,d7     ; Swap 16x4, part 1
  91.   MOVE.w  d0,d4
  92.   SWAP  d4
  93.   MOVE.w  d4,d0
  94.   MOVE.w  d7,d4
  95.   MOVE.l  d5,d7
  96.   MOVE.w  d1,d5
  97.   SWAP  d5
  98.   MOVE.w  d5,d1
  99.   MOVE.w  d7,d5
  100.  
  101.   MOVE.l  d4,d7     ; Swap 2x4, part 1
  102.   LSR.l #2,d7
  103.   EOR.l d0,d7
  104.   AND.l #$33333333,d7
  105.   EOR.l d7,d0
  106.   LSL.l #2,d7
  107.   EOR.l d7,d4
  108.   MOVE.l  d5,d7
  109.   LSR.l #2,d7
  110.   EOR.l d1,d7
  111.   AND.l #$33333333,d7
  112.   EOR.l d7,d1
  113.   LSL.l #2,d7
  114.   EOR.l d7,d5
  115.  
  116.   MOVE.l  (a0),a5
  117.   MOVE.l  a7,(a0)+
  118.   MOVE.l  (a0),a6
  119.   MOVE.l  a7,(a0)+
  120.  
  121.   EXG d4,a5
  122.   EXG d5,a6
  123.  
  124.   MOVE.l  d4,d7     ; Swap 16x4, part 2
  125.   MOVE.w  d2,d4
  126.   SWAP  d4
  127.   MOVE.w  d4,d2
  128.   MOVE.w  d7,d4
  129.   MOVE.l  d5,d7
  130.   MOVE.w  d3,d5
  131.   SWAP  d5
  132.   MOVE.w  d5,d3
  133.   MOVE.w  d7,d5
  134.  
  135.   MOVE.l  d4,d7     ; Swap 2x4, part 2
  136.   LSR.l #2,d7
  137.   EOR.l d2,d7
  138.   AND.l #$33333333,d7
  139.   EOR.l d7,d2
  140.   LSL.l #2,d7
  141.   EOR.l d7,d4
  142.   MOVE.l  d5,d7
  143.   LSR.l #2,d7
  144.   EOR.l d3,d7
  145.   AND.l #$33333333,d7
  146.   EOR.l d7,d3
  147.   LSL.l #2,d7
  148.   EOR.l d7,d5
  149.  
  150.   MOVE.l  d1,d7     ; Swap 4x1
  151.   LSR.l #4,d7
  152.   EOR.l d0,d7
  153.   AND.l #$0f0f0f0f,d7
  154.   EOR.l d7,d0
  155.   LSL.l #4,d7
  156.   EOR.l d7,d1
  157.   MOVE.l  d3,d7
  158.   LSR.l #4,d7
  159.   EOR.l d2,d7
  160.   AND.l #$0f0f0f0f,d7
  161.   EOR.l d7,d2
  162.   LSL.l #4,d7
  163.   EOR.l d7,d3
  164.  
  165.   BRA _start
  166. _x
  167.   MOVE.l  (a0),d0
  168.   MOVE.l  a7,(a0)+
  169.   MOVE.l  (a0),d1
  170.   MOVE.l  a7,(a0)+
  171.   MOVE.l  (a0),d2
  172.   MOVE.l  a7,(a0)+
  173.   MOVE.l  (a0),d3
  174.   MOVE.l  a7,(a0)+
  175.   MOVE.l  (a0),d4
  176.   MOVE.l  a7,(a0)+
  177.   MOVE.l  (a0),d5
  178.   MOVE.l  a7,(a0)+
  179.  
  180.   MOVE.l  a6,-c2pBPLSIZE(a1)
  181.  
  182.   MOVE.l  d4,d7     ; Swap 16x4, part 1
  183.   MOVE.w  d0,d4
  184.   SWAP  d4
  185.   MOVE.w  d4,d0
  186.   MOVE.w  d7,d4
  187.   MOVE.l  d5,d7
  188.   MOVE.w  d1,d5
  189.   SWAP  d5
  190.   MOVE.w  d5,d1
  191.   MOVE.w  d7,d5
  192.  
  193.   MOVE.l  d4,d7     ; Swap 2x4, part 1
  194.   LSR.l #2,d7
  195.   EOR.l d0,d7
  196.   AND.l #$33333333,d7
  197.   EOR.l d7,d0
  198.   LSL.l #2,d7
  199.   EOR.l d7,d4
  200.   MOVE.l  d5,d7
  201.   LSR.l #2,d7
  202.   EOR.l d1,d7
  203.   AND.l #$33333333,d7
  204.   EOR.l d7,d1
  205.   LSL.l #2,d7
  206.   EOR.l d7,d5
  207.  
  208.   MOVE.l  (a0),d7
  209.   MOVE.l  a7,(a0)+
  210.   MOVE.l  (a0),a6
  211.   MOVE.l  a7,(a0)+
  212.  
  213.   MOVE.l  a5,-c2pBPLSIZE(a2)
  214.  
  215.   MOVE.l  d7,a5
  216.   EXG d4,a5
  217.   EXG d5,a6
  218.  
  219.   MOVE.l  d4,d7     ; Swap 16x4, part 2
  220.   MOVE.w  d2,d4
  221.   SWAP  d4
  222.   MOVE.w  d4,d2
  223.   MOVE.w  d7,d4
  224.   MOVE.l  d5,d7
  225.   MOVE.w  d3,d5
  226.   SWAP  d5
  227.   MOVE.w  d5,d3
  228.   MOVE.w  d7,d5
  229.  
  230.   MOVE.l  d4,d7     ; Swap 2x4, part 2
  231.   MOVE.l  d6,(a2)+
  232.   LSR.l #2,d7
  233.   EOR.l d2,d7
  234.   AND.l #$33333333,d7
  235.   EOR.l d7,d2
  236.   LSL.l #2,d7
  237.   EOR.l d7,d4
  238.   MOVE.l  d5,d7
  239.   LSR.l #2,d7
  240.   EOR.l d3,d7
  241.   AND.l #$33333333,d7
  242.   EOR.l d7,d3
  243.   LSL.l #2,d7
  244.   EOR.l d7,d5
  245.  
  246.   MOVE.l  d1,d7     ; Swap 4x1
  247.   LSR.l #4,d7
  248.   EOR.l d0,d7
  249.   MOVE.l  a4,(a1)+
  250.   AND.l #$0f0f0f0f,d7
  251.   EOR.l d7,d0
  252.   LSL.l #4,d7
  253.   EOR.l d7,d1
  254.   MOVE.l  d3,d7
  255.   LSR.l #4,d7
  256.   EOR.l d2,d7
  257.   AND.l #$0f0f0f0f,d7
  258.   EOR.l d7,d2
  259.   LSL.l #4,d7
  260.   EOR.l d7,d3
  261. _start
  262.  
  263.   MOVE.l  d2,d7     ; Swap 8x2, part 1
  264.   LSR.l #8,d7
  265.   EOR.l d0,d7
  266.   AND.l #$00ff00ff,d7
  267.   EOR.l d7,d0
  268.   LSL.l #8,d7
  269.   EOR.l d7,d2
  270.   MOVE.l  d2,d7
  271.   LSR.l #1,d7     ; Swap 1x2, part 1
  272.   EOR.l d0,d7
  273.   AND.l #$55555555,d7
  274.   EOR.l d7,d0
  275.   MOVE.l  d0,c2pBPLSIZE*2(a2)
  276.   ADD.l d7,d7
  277.   EOR.l d7,d2
  278.   MOVE.l  d3,d7     ; Swap 8x2, part 2
  279.   LSR.l #8,d7
  280.   EOR.l d1,d7
  281.   AND.l #$00ff00ff,d7
  282.   EOR.l d7,d1
  283.   LSL.l #8,d7
  284.   EOR.l d7,d3
  285.   MOVE.l  d3,d7
  286.   LSR.l #1,d7     ; Swap 1x2, part 2
  287.   EOR.l d1,d7
  288.   AND.l #$55555555,d7
  289.   EOR.l d7,d1
  290.   MOVE.l  d1,c2pBPLSIZE*2(a1)
  291.   ADD.l d7,d7
  292.   EOR.l d7,d3
  293.  
  294.   MOVE.l  d5,d7
  295.   LSR.l #4,d7
  296.   EOR.l d4,d7
  297.   AND.l #$0f0f0f0f,d7
  298.   EOR.l d7,d4
  299.   LSL.l #4,d7
  300.   EOR.l d7,d5
  301.  
  302.   EXG d4,a5
  303.   EXG d5,a6
  304.  
  305.   MOVE.l  d5,d7
  306.   LSR.l #4,d7
  307.   EOR.l d4,d7
  308.   AND.l #$0f0f0f0f,d7
  309.   EOR.l d7,d4
  310.   LSL.l #4,d7
  311.   EOR.l d7,d5
  312.  
  313.   MOVE.l  a5,d0
  314.   MOVE.l  a6,d1
  315.   MOVE.l  d2,c2pBPLSIZE(a2)
  316.  
  317.   MOVE.l  d0,d7     ; Swap 8x2, part 3
  318.   LSR.l #8,d7
  319.   EOR.l d4,d7
  320.   AND.l #$00ff00ff,d7
  321.   EOR.l d7,d4
  322.   LSL.l #8,d7
  323.   EOR.l d7,d0
  324.   MOVE.l  d0,d7
  325.   LSR.l #1,d7     ; Swap 1x2, part 3
  326.   EOR.l d4,d7
  327.   AND.l #$55555555,d7
  328.   EOR.l d7,d4
  329.   ADD.l d7,d7
  330.   EOR.l d7,d0
  331.   MOVE.l  d1,d7     ; Swap 8x2, part 4
  332.   LSR.l #8,d7
  333.   MOVE.l  d3,c2pBPLSIZE(a1)
  334.   EOR.l d5,d7
  335.   AND.l #$00ff00ff,d7
  336.   EOR.l d7,d5
  337.   LSL.l #8,d7
  338.   EOR.l d7,d1
  339.   MOVE.l  d1,d7
  340.   LSR.l #1,d7     ; Swap 1x2, part 4
  341.   EOR.l d5,d7
  342.   AND.l #$55555555,d7
  343.   EOR.l d7,d5
  344.   ADD.l d7,d7
  345.   EOR.l d7,d1
  346.  
  347.   MOVE.l  d0,a5
  348.   MOVE.l  d1,a6
  349.  
  350.   MOVE.l  d4,d6
  351.   MOVE.l  d5,a4
  352.  
  353.   CMP.l a0,a3
  354.   BNE _x
  355.  
  356.   MOVE.l  a6,-c2pBPLSIZE(a1)
  357.   MOVE.l  a5,-c2pBPLSIZE(a2)
  358.   MOVE.l  d6,(a2)+
  359.   MOVE.l  a4,(a1)+
  360.   MOVE.l  stackstore(pc),a7
  361.   MOVEM.l (a7)+,a3-a6
  362. AsmExit
  363.  
  364.   Even4
  365. stackstore: Dc.l 0
  366. c2p_data
  367. c2p_scroffs: Dc.l 0
  368. c2p_pixels: Dc.l 0
  369.   Ds.l  16
  370.   Even4
  371. c2p_datanew
  372.   Ds.l  16
  373. End Statement
  374.  
  375. Statement chunkyshape1{A.l,B.l,C.l,D.l,E.l}
  376. .chunkyshape1
  377. ;any position masked with mask data and movement table
  378.   MOVEM.l a3-a6,-(a7)
  379.   MOVE.l  d4,d7 ; object loop
  380.   SUBQ.l  #1,d7
  381.   MOVE.l  d3,a3 ; base of table
  382.   MOVE.l  d0,a4 ; store
  383.   MOVE.l  d1,a5 ; store
  384.   MOVE.l  d2,a6 ; store
  385. objloop
  386.  
  387.   MOVEQ.l #0,d3
  388.   MOVE.w  (a3),d3
  389.   MOVEQ.l #0,d5
  390.   MOVEQ.l #0,d6
  391.   MOVE.w  4(a3),d5
  392.   MOVE.w  6(a3),d6
  393.   CMP.w   #6,d3 ; x<6?
  394.   BLE     xle
  395.   CMP.w   #scrwidth-objwidth-6,d3
  396.   BLT     xskip
  397. xle
  398.   EXG.l   d5,d6
  399. xskip
  400.   EXT.l   d5
  401.   ADD.l   d5,d3
  402.   MOVE.w  d3,(a3)
  403.   MOVE.w  d5,4(a3)
  404.   MOVE.w  d6,6(a3)
  405.  
  406.   MOVEQ.l #0,d4
  407.   MOVE.w  2(a3),d4
  408.   MOVEQ.l #0,d5
  409.   MOVEQ.l #0,d6
  410.   MOVE.w  8(a3),d5
  411.   MOVE.w  10(a3),d6
  412.   CMP.w   #6,d4 ; y<6?
  413.   BLE     yle
  414.   CMP.w   #scrheight-objheight-6,d4
  415.   BLT     yskip
  416. yle
  417.   EXG.l   d5,d6
  418. yskip
  419.   EXT.l   d5
  420.   ADD.l   d5,d4
  421.   MOVE.w  d4,2(a3)
  422.   MOVE.w  d5,8(a3)
  423.   MOVE.w  d6,10(a3)
  424.  
  425.   ADD.l   #12,a3
  426.   MULU    #scrwidth,d4
  427.   MOVE.l  a4,a0 ; input
  428.   ADD.l   d3,d4
  429.   MOVE.l  a5,a2 ; mask
  430.   MOVE.l  a6,d2
  431.   ADD.l   d4,d2 ; output
  432.   MOVE.l  d2,a1 ; output
  433.   MOVE.l  #objheight-1,d2
  434.   MOVE.l  #scrwidth-objwidth,d3
  435. ;Do masked blit
  436. yloop
  437.     MOVEQ.l #objlongwidth-1,d4
  438. xloop
  439.       MOVE.l  (a2)+,d0
  440.       AND.l   d0,(a1)
  441.       MOVE.l  (a0)+,d1
  442.       OR.l    d1,(a1)+
  443.       DBRA    d4,xloop
  444.     ADD.l   d3,a1
  445.     DBRA    d2,yloop
  446.   DBRA    d7,objloop
  447.   MOVEM.l (a7)+,a3-a6
  448. AsmExit
  449. End Statement
  450.  
  451. Statement chunkyshape2{A.l,B.l,C.l,D.l,E.l}
  452. .chunkyshape2
  453. ;any position masked with mask data and movement table
  454. ;B.l is unused in this routine
  455.   MOVEM.l a3-a6,-(a7)
  456.   MOVE.l  d4,d7 ; object loop
  457.   SUBQ.l  #1,d7
  458.   MOVE.l  d3,a3 ; base of table
  459.   MOVE.l  d0,a4 ; store
  460. ;  MOVE.l  d1,a5 ; store
  461.   MOVE.l  d2,a6 ; store
  462. objloop2
  463.  
  464.   MOVEQ.l #0,d3
  465.   MOVE.w  (a3),d3
  466.   MOVEQ.l #0,d5
  467.   MOVEQ.l #0,d6
  468.   MOVE.w  4(a3),d5
  469.   MOVE.w  6(a3),d6
  470.   CMP.w   #6,d3 ; x<6?
  471.   BLE     xle2
  472.   CMP.w   #scrwidth-objwidth-6,d3
  473.   BLT     xskip2
  474. xle2
  475.   EXG.l   d5,d6
  476. xskip2
  477.   EXT.l   d5
  478.   ADD.l   d5,d3
  479.   MOVE.w  d3,(a3)
  480.   MOVE.w  d5,4(a3)
  481.   MOVE.w  d6,6(a3)
  482.  
  483.   MOVEQ.l #0,d4
  484.   MOVE.w  2(a3),d4
  485.   MOVEQ.l #0,d5
  486.   MOVEQ.l #0,d6
  487.   MOVE.w  8(a3),d5
  488.   MOVE.w  10(a3),d6
  489.   CMP.w   #6,d4 ; y<6?
  490.   BLE     yle2
  491.   CMP.w   #scrheight-objheight-6,d4
  492.   BLT     yskip2
  493. yle2
  494.   EXG.l   d5,d6
  495. yskip2
  496.   EXT.l   d5
  497.   ADD.l   d5,d4
  498.   MOVE.w  d4,2(a3)
  499.   MOVE.w  d5,8(a3)
  500.   MOVE.w  d6,10(a3)
  501.  
  502.   ADD.l   #12,a3
  503.   MULU    #scrwidth,d4
  504.   MOVE.l  a4,a0 ; input
  505.   ADD.l   d3,d4
  506. ;  MOVE.l  a5,a2 ; mask
  507.   MOVE.l  a6,d2
  508.   ADD.l   d4,d2 ; output
  509.   MOVE.l  d2,a1 ; output
  510.   MOVE.l  #objheight-1,d2
  511.   MOVE.l  #scrwidth-objwidth,d3
  512. ;Do unmasked blit
  513. yloop2
  514.     MOVEQ.l #objlongwidth-1,d4
  515. xloop2
  516.       MOVE.l  (a0)+,(a1)+
  517.       DBRA    d4,xloop2
  518.     ADD.l   d3,a1
  519.     DBRA    d2,yloop2
  520.   DBRA    d7,objloop2
  521.   MOVEM.l (a7)+,a3-a6
  522. AsmExit
  523. End Statement
  524.  
  525. .blitzprogram
  526. ; Setup
  527. InitBank 1,#scrwidth*#scrheight,$10000 ; Fastram chunky buffer
  528. InitPalette 0,256
  529. For c=1 To 255
  530.   AGAPalRGB 0,c,(c/2)+Rnd(128),(c/2)+Rnd(128),(c/2)+Rnd(128)
  531. Next c
  532. AGAPalRGB 0,0,0,0,0
  533. VWait
  534. InitBank 0,(#scrwidth*Max(#planeheight,#c2pBPLY))+1000,2|65536 ; Chipram planar buffer
  535. CludgeBitMap 0,#scrwidth,Max(#planeheight,#c2pBPLY),8,Bank(0)
  536. Screen 0,0,0,#scrwidth,Max(#planeheight,#c2pBPLY),8,0,"c2p test",0,0,0
  537. Use Palette 0
  538. VWait 50
  539.  
  540. ; chunky shape
  541. InitBank 2,#objwidth*#objheight,$10000 ; chunky shape
  542. cstep.q=256/(#objwidth*#objheight)
  543. c.q=0
  544. For o.l=0 To (#objwidth*#objheight)-1
  545.   NPokeB Bank(2)+o,255-c
  546.   c+cstep
  547. Next o
  548. If #objmasking<>0
  549.   CacheClearU_
  550.   For o.l=0 To #objwidth*#objheight
  551.     p3.l=Bank(2)+Rnd(#objwidth*#objheight)-1
  552.     NPokeB p3,$00
  553.   Next o
  554. EndIf
  555.  
  556. ; chunky mask
  557. InitBank 3,#objwidth*#objheight,$10000 ; chunky mask
  558. For o.l=0 To (#objwidth*#objheight)-1
  559.   If NPeekB(Bank(2)+o)=0 Then NPokeB Bank(3)+o,$ff Else NPokeB Bank(3)+o,$0
  560. Next o
  561.  
  562. ; movement table
  563. InitBank 5,#maxobjcount*12,$10000 ; table
  564. For o.l=0 To (#maxobjcount-1)*12 Step 12
  565.   p1.w=6+Rnd(#scrwidth-#objwidth-14)
  566.   p2.w=6+Rnd(#scrheight-#objheight-14)
  567.   NPokeW Bank(5)+o,p1
  568.   NPokeW Bank(5)+o+2,p2
  569.   Repeat:xmove.w=Rnd(3)-Rnd(6):Until xmove<>0
  570.   Repeat:ymove.w=Rnd(3)-Rnd(6):Until ymove<>0
  571.   NPokeW Bank(5)+o+4,xmove
  572.   NPokeW Bank(5)+o+6,-xmove
  573.   NPokeW Bank(5)+o+8,ymove
  574.   NPokeW Bank(5)+o+10,-ymove
  575. Next o
  576.  
  577. ; Do the c2p test
  578. c2p040onlyinit{#scrwidth,#scrheight}
  579. CacheClearU_
  580. Forbid_
  581. VWait
  582. While Joyb(0)=0
  583.   If #objmasking<>0
  584.     ResetTimer
  585.     For time=1 To #iterations
  586.       chunkyshape1{Bank(2),Bank(3),Bank(1),Bank(5),objcount}
  587.       c2p040only{Bank(1),Bank(0)} ; Convert chunky to planar
  588.     Next time
  589.     t=Ticks
  590.   Else
  591.     ResetTimer
  592.     For time=1 To #iterations
  593.       chunkyshape2{Bank(2),Bank(3),Bank(1),Bank(5),objcount}
  594.       c2p040only{Bank(1),Bank(0)} ; Convert chunky to planar
  595.     Next time
  596.     t=Ticks
  597.   EndIf
  598.   fps.q=50/(t/#iterations)
  599.   If (fps>#targetfps) AND (objcount<=(#maxobjcount-#objadd)) Then objcount+#objadd Else Goto skipwend
  600. Wend
  601. skipwend:
  602. VWait 2 : Permit_
  603. VWait 20
  604. FindScreen 0
  605. Window 0,0,11,640,100,0,"Test results for c2p",0,0
  606. WindowOutput 0
  607. NPrint "Routine performed @",#targetfps,"(",fps,")fps, doing ",objcount," ",#objwidth,"x",#objheight," objects."
  608. NPrint " "
  609. NPrint "Press mousebutton..."
  610. Free Screen 0
  611. MouseWait
  612. Free Window 0
  613. End
  614.  
  615.